package router

import (
	"github.com/gin-gonic/gin"
	"main/apis"
)

func SetupRouter() *gin.Engine {
	r := gin.Default()

	v1 := r.Group("/v1")
	{
		v1.GET("/user/:id", apis.GetUser)
		v1.POST("/user", apis.AddUser)
		v1.PUT("/user/:id", apis.UpdateUser)
		v1.GET("/user", apis.GetUserList)
		v1.DELETE("/user/:id", apis.DelUser)
	}
	return r
}
